Field of the Invention
The present invention relates to an image capturing apparatus and a method for controlling the same, and more specifically relates to an image capturing apparatus that performs focus detection using signals from pixels capable of receiving light that passes through different pupil areas of an imaging lens, and a method for controlling the same.
Description of the Related Art
Conventionally, there are techniques for focus detection using a phase difference method at the same time as imaging by means of a configuration in which the pixels in an image sensor receive light that has passed through a different pupil area of an imaging lens. Japanese Patent Laid-Open No. 2001-083407 and Japanese Patent Laid-Open No. 2001-250931 disclose configurations in which, by providing photodiodes (PD) for receiving light collected by one micro-lens in a pixel, each photodiode receives light that passes through different pupil areas of an imaging lens. Also, Japanese Patent No. 03592147 discloses a configuration in which, by changing the wiring layer arranged in front of a PD depending on the pixel and changing the aperture of the PD, a pixel receives light that passes through different pupil areas of an imaging lens. With these techniques, an image shift amount is detected, or in other words, a phase difference is detected based on signals of PDs that have received light that has passed through different pupil areas of an imaging lens, a focus shift amount is calculated based on the image shift amount, and focus detection is performed.
In the case of an image capturing apparatus that detects a phase difference using an image sensor, it is preferable that the image shift amount detection area is two-dimensional rather than one-dimensional. This is because if the detection area is comprised of only one line, the width of a detection area in the line direction is of the pixel pitch of the image sensor and too narrow. However, in the case of using a two-dimensional detection area, if a defective line containing consecutive defective pixels in the column direction is included among the lines in the detection area, this will generate a deviation in the results of the phase difference detection and the accuracy of the phase difference detection will decrease.
On the other hand, in the case of using an image sensor having two divided PDs per micro-lens, it takes twice the amount of read-out time to individually read out signals from the two PDs. Japanese Patent Laid-Open No. 2004-134867 discloses a method for reading out signals from two lines of PDs at a high speed using two readout circuits. Specifically, a reset signal is read out, and thereafter the first PD signal is read out, and a second PD signal is read out on top of the first PD signal. Thus, it is possible to obtain the second PD signal by subtracting the first PD signal from the added sum signal of the two PDs, and an increase in speed is realized by reducing the number of reset signal readout times. This technique can provide an increase in speed even in the case where signals are read out individually from PDs, from an image sensor having the above-mentioned configuration in which two divided PDs correspond to one micro-lens.
In the case of detecting a phase difference using an image sensor, a signal obtained by adding two PD signals together can be used as the image signal and signals obtained by reading out two PD signals separately can be used for the phase difference detection. In these readout methods, there may be a case in which the signal obtained by adding the two PD signals of a pixel is normal, but the individual PD signals are defective. Specifically, this happens when two PD signals are read out in combination with each other due to a defect that occurs when the first PD signal is to be read out. In this case, two PD signals are read out at the time of reading out the first PD signal, and two image signals are obtained at the time of reading out the image signal obtained by adding the first and second PD signals together as well. In other words, this results in not being able to obtain the first PD signal as well as the second PD signal even if the first PD signal is subtracted from the added PD signals.
Thus, even though there is no defective line in the captured image when reading out the two PD signals at a high speed, it is possible for a defective line to appear in the image that is to be used for phase difference detection. If there is a defect in the image for phase difference detection, the accuracy of the phase difference detection will decrease as stated above. A defective line in an image for viewing is normally treated as a product defect. But in this case, although there is no defective line in the image for viewing, the image sensor is treated as a product defect because there is a defective line in the image for phase difference detection and the yield will be reduced.